/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cz.mzk.oai.metadataRepository.transformation;

import cz.mzk.oai.metadataRepository.metadata.MetadataFormat;
import java.io.File;
import org.dom4j.Document;
import rukopisyimport.sourceData.TeiDocument;

/**
 *
 * @author Martin Řehánek (rehan at mzk.cz)
 */
public class TeiBasedXsltEseBuilder extends XsltSingleSourceConditionedBuilder{

    public TeiBasedXsltEseBuilder(File tei2eseXslt) throws TransformationException{
        super(tei2eseXslt,MetadataFormat.tei_p5, MetadataFormat.ese);
    }

    @Override
    boolean canBeTransformed(Document sourceDocument) {
        TeiDocument tei = new TeiDocument(sourceDocument);
        return tei.isDigitalized();
    }
}
